import { useState, useCallback } from 'react'

export default function useAuthModel() {
  const [uid, setUid] = useState(null)
  const [userinfo, setUserinfo] = useState({})
  const [authenticated, setAuthenticated] = useState('')
  const [qrCode, setQrCode] = useState('')

  const signin = useCallback((account, password) => {
    // signin implementation
    // setUser(user from signin API)
  }, [])
  const signout = useCallback(() => {
    // signout implementation
    // setUser(null)
  }, [])

  return {
    uid,
    setUid,
    userinfo,
    setUserinfo,
    authenticated,
    setAuthenticated,
    qrCode,
    setQrCode,
    signin,
    signout
  }
}